﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace FU.Capstones.IMS.Web.Common.Converters
{
    public class BoolToImportExportConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool? inputValue = (bool?)value;
            if (inputValue.HasValue)
            {
                if (inputValue == true)
                {
                    return "Nhập kho";
                }
                if (inputValue == false)
                {
                    return "Xuất kho";
                }
            }
            return string.Empty;
            //if (Equals(value, true))
            //{
            //    string importString = "Nhập kho";
            //    return importString;
            //}

            //string exportstring = "Xuất kho";
            //return exportstring;

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}